From 7b8c036f8fd1c351d6816250283d9651f625c4ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Oct 2017 08:06:33 +0200 Subject: [PATCH] eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps The > 1 meant it only emits the signal for -2/+2 steps. --- gtk/gtkeventcontrollerscroll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c index 61f916782c..57991db1ae 100644 --- a/gtk/gtkeventcontrollerscroll.c +++ b/gtk/gtkeventcontrollerscroll.c @@ -239,14 +239,14 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller, scroll->cur_dy += dy; dx = dy = 0; - if (ABS (scroll->cur_dx) > 1) + if (ABS (scroll->cur_dx) >= 1) { steps = trunc (scroll->cur_dx); scroll->cur_dx -= steps; dx = steps; } - if (ABS (scroll->cur_dy) > 1) + if (ABS (scroll->cur_dy) >= 1) { steps = trunc (scroll->cur_dy); scroll->cur_dy -= steps; -- 2.30.2